<#macro page pageBean>
<div class="pagination"> 
<a <#if (pageBean.currentPage!=1)>href="${pageBean.url}/1"</#if>  title="首页">&laquo; 首页</a>
<a <#if (pageBean.currentPage!=1)> href="${pageBean.url}/${pageBean.currentPage-1}"</#if> title="上一页">&laquo; 上一页</a> 
<#if (pageBean.totalPages<=5) >
	<#list 1..pageBean.totalPages as  pages>
		<#if pages==pageBean.currentPage>
		<a  class="number current" title="${pages}">${pages}</a> 
		<#else>
		<a href="${pageBean.url}/${pages}" class="number" title="${pages}">${pages}</a> 
		</#if>
	</#list>
<#else>
	<#if (pageBean.currentPage<4)>
		<#list 1..5 as pages>
		<#if pages==pageBean.currentPage>
		<a class="number current" title="${pages}">${pages}</a> 
		<#else>
		<a href="${pageBean.url}/${pages}" class="number" title="${pages}">${pages}</a> 
		</#if>
		</#list>
	<#elseif (pageBean.currentPage>pageBean.totalPages-4)>
		<#list (pageBean.totalPages-4)..(pageBean.totalPages) as pages>
		<#if pages==pageBean.currentPage>
		<a class="number current" title="${pages}">${pages}</a> 
		<#else>
		<a href="${pageBean.url}/${pages}" class="number" title="${pages}">${pages}</a> 
		</#if>
		</#list>
	<#else>
		<#list (pageBean.currentPage-2)..(pageBean.currentPage+2) as pages>
		<#if pages==pageBean.currentPage>
		<a class="number current" title="${pages}">${pages}</a> 
		<#else>
		<a href="${pageBean.url}/${pages}" class="number" title="${pages}">${pages}</a> 
		</#if>
		</#list>
	</#if>
</#if>

<a <#if (pageBean.currentPage!=pageBean.totalPages)>href="${pageBean.url}/${pageBean.currentPage+1}"</#if> title="下一页">下一页 &raquo;</a>
<a <#if (pageBean.currentPage!=pageBean.totalPages)>href="${pageBean.url}/${pageBean.totalPages}"</#if> title="尾页">尾页 &raquo;</a> </div>
</#macro>